{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<style>
	table tr:nth-child(4){background:#ccc;}
	table tr:nth-child(9){background:#ccc;}
	.text-c{
		margin-bottom: 35px;
	}
</style>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
    
    统计中心
    <span class="c-gray en">&gt;</span>
    财务统计
    <a class="btn btn-success radius r"
       style="line-height: 1.6em; margin-top: 3px"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div style="padding:20px;height:30px;">
  	
  	<div class="new_box">
<div class="page-container dataTables_wrapper">
    <div class="text-c" style="padding :20px 0;">
        <form action="" method="post" class="l" style="margin-left:20px;">
            日期选择
            <input type="text" name="searchtime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'{$current}'})" value="{$searchtime}" class="input-text Wdate" style="width:120px;">
            <button class="btn btn-success" type="submit" style="margin-right:20px;"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
        <span class="l"  style="margin-left: 20px;">
		<!--<a style="margin:0px 20px;display:inline-block;" class="btn btn-primary" href="javascript:history.go(-1);">返回</a>-->
		</span>
    </div>
    <div id="tab-system" class="HuiTab">
        <div class="tabCon">
            <div class="mt-20">
                <table class="table table-border table-bordered table-bg  table-sort table-responsive">
                    <thead>
                        <tr class="text-c">
                            <th colspan="4">今日分析</th>
                            <th colspan="3">本月分析</th>
                        </tr>
                        <tr class="text-c">
                            <th></th>
                            <th>金额</th>
                            <th>人数</th>
                            <th>笔数</th>
                            <th>金额</th>
                            <th>人数</th>
                            <th>笔数</th>
                        </tr>
                    </thead>
                    <tbody>
                    {foreach($list as $k=>$v)}
                    <tr class="text-c">
                        <td>
                        {switch name="$k"}
                                {case value="xx"}线下存款{/case}
                                {case value="xs"}线上存款{/case}
                                {case value="rgcr"}人工存入{/case}
                                {case value="rk"}存款总额{/case}
                                {case value="cj"}彩金赠送{/case}
                                {case value="fs"}返水情况{/case}
                                {case value="rgqc"}人工取出{/case}
                                {case value="tx"}会员提现{/case}
                                {case value="ck"}出款总额{/case}
                                {case value="yk"}赢亏{/case}
                                {case value="xj"}小计{/case}
                                {default /}未知
                            {/switch}</a>
                            
                        </td>
                        {if condition="('yk' == $k)"}
                            <td colspan="3" data="{$v.day_je ? $v.day_je : '0.00'}" class="all_td">
                            
                            </td>
                            <td colspan="3" data="{$v.month_je ? $v.month_je : '0.00'}" class="all_td">{$v.month_je ? $v.month_je : '0.00'}</td>
                        {else /}
                            <td align="left">
                            {if condition="$k != 'xj' && $k != 'yk'"}
                            <a style="text-decoration:underline" class="ml-5" onclick="checklist('财务详情','/admin/statistics/financialDetail?type={$k}&searchtime={$searchtime}',1200)" href="javascript:;">{$v.day_je ? $v.day_je : '0.00'}</a>
                            {else/}
                            {$v.day_je ? $v.day_je : '0.00'}
                            {/if}
                            </td>
                            <td align="left">{$v.day_user}</td>
                            <td align="left">{$v.day_count}</td>
                            <td align="left">{$v.month_je ? $v.month_je : '0.00'}</td>
                            <td align="left">{$v.month_user}</td>
                            <td align="left">{$v.month_count}</td>
                        {/if}
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
</div>

</div>
{/block}{block name="js"}

<script type="text/javascript" src="__SYSMET__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript">
/*查看财务详情*/
function checklist(title,url,w,h){
	layer_show(title,url,w,h);
}

    $(function() {
        $('.skin-minimal input').iCheck({
            checkboxClass : 'icheckbox-blue',
            radioClass : 'iradio-blue',
            increaseArea : '20%'
        });
        $("#tab-system").Huitab({
            index : 0
        });
    });
    

var allTd=document.getElementsByClassName('all_td')
for(var i=0;i<allTd.length;i++){
var str_td=parseFloat(allTd[i].getAttribute('data'))
   var str_td_two=str_td.toFixed(2)
	allTd[i].innerHTML=str_td_two
}
</script>
{/block}
